Contents


 Basic Operations

•	Overview on Using the Dialog Editor

•	Creating a File

•	Creating Additional Dialogs

•	Creating Controls

•	Opening a File

•	Saving Dialogs

•	Saving Dialogs Under a New Name

•	Associating an Include File of a New Name

•	Exiting the Dialog Editor

•	Key to the Properties Bar

•	Key to the Toolbox


 Editing Dialogs and Controls

•	Selecting a Dialog in a File

•	Selecting Controls for Editing

•	Undoing Changes to a Dialog

•	Moving and Resizing Controls and Dialogs

•	Cutting Controls and Dialogs

•	Deleting Controls and Dialogs

•	Copying Controls and Dialogs

•	Pasting Controls and Dialogs

•	Duplicating Controls and Dialogs

•	Sizing Controls to Text

•	Editing Symbolic Names

•	Editing Dialog or Control Styles


Editing Styles
 Styles

•	Check Box Styles

•	Combo Box Styles

•	Custom Control Styles

•	Dialog Box Styles

•	Edit Field Styles

•	Frame Styles

•	Group Box Styles

•	Horizontal Scroll Bar Styles

•	Icon Styles

•	List Box Styles

•	Push Button Styles

•	Radio Button Styles

•	Rectangle Styles

•	Text Styles

•	Vertical Scroll Bar Styles


 Aligning Groups of Controls

A group is a collection of controls. For example, three radio buttons framed by a rectangle control is a group. You can edit groups or apply various alignment and sizing commands to a group.

•	Selecting a Group of Controls for Editing

•	Aligning a Group of Controls

•	Spacing a Group Evenly

•	Sizing a Group Uniformly

•	Arranging a Group of Push Buttons

•	Ordering a Group

•	Changing Grid Size and Spacing Constants


 Options

You can set options for testing dialog boxes, changing the notation for ID values, translating dialog boxes into another language---such as French or German---and using the new RC keywords in .DLG files.

•	Using Test Mode

•	Using Hex Mode

•	Using Translate Mode

•	Using New Keywords


 Shortcut Keys

•	Shortcut Keys

•	Keys to Select and Arrange Controls

•	Help Keys


 Custom Controls

A custom control is a nonstandard control that you create for special purposes. A custom control consists of a dynamic-link library (DLL) that contains the window procedure for the control.

•	What is a Custom Control?

•	Creating a Temporary Custom Control

•	Opening a Custom Control DLL

•	Adding a Custom Control to a Dialog Box

•	Removing a Custom Control


 Basic Operations

•	Overview on Using the Dialog Editor

•	Creating a File

•	Creating Additional Dialogs

•	Creating Controls

•	Opening a File

•	Saving Dialogs

•	Saving Dialogs Under a New Name

•	Associating an Include File of a New Name

•	Exiting the Dialog Editor

•	Key to the Properties Bar

•	Key to the Toolbox


 Editing Dialogs and Controls

•	Selecting a Dialog in a File

•	Selecting Controls for Editing

•	Undoing Changes to a Dialog

•	Moving and Resizing Controls and Dialogs

•	Cutting Controls and Dialogs

•	Deleting Controls and Dialogs

•	Copying Controls and Dialogs

•	Pasting Controls and Dialogs

•	Duplicating Controls and Dialogs

•	Sizing Controls to Text

•	Editing Symbolic Names

•	Editing Dialog or Control Styles


Editing Styles
 Styles

•	Check Box Styles

•	Combo Box Styles

•	Custom Control Styles

•	Dialog Box Styles

•	Edit Field Styles

•	Frame Styles

•	Group Box Styles

•	Horizontal Scroll Bar Styles

•	Icon Styles

•	List Box Styles

•	Push Button Styles

•	Radio Button Styles

•	Rectangle Styles

•	Text Styles

•	Vertical Scroll Bar Styles


 Aligning Groups of Controls

•	Selecting a Group of Controls for Editing

•	Aligning a Group of Controls

•	Spacing a Group Evenly

•	Sizing a Group Uniformly

•	Arranging a Group of Push Buttons

•	Ordering a Group

•	Changing Grid Size and Spacing Constants


 Options

•	Using Test Mode

•	Using Hex Mode

•	Using Translate Mode

•	Using New Keywords


 Shortcut Keys

•	Shortcut Keys

•	Keys to Select and Arrange Controls

•	Help Keys


 Custom Controls

•	What is a Custom Control?

•	Creating a Temporary Custom Control

•	Opening a Custom Control DLL

•	Adding a Custom Control to a Dialog Box

•	Removing a Custom Control


Overview of Dialog Editor Operations
 Overview on Using the Dialog Editor

 To create dialog boxes for your application:

1.	 Create dialogs in the Dialog Editor.

2.	 Keep your dialogs for an application together.

3.	 Incorporate the dialogs you've designed into your application.

 Terms Defined:

Dialogs

Controls

Toolbox

Dialog Files

Module-Definition File


Using the Dialog Editor
Use the Dialog Editor to create dialog boxes for your Windows applications. Its graphical interface makes a lengthy programming chore a snap.

You build a dialog on-screen by selecting controls from the editor's Toolbox and dropping them into the dialog.


Keeping Dialogs Together
Keep together all the dialogs you design for an application. With three commands, you can manage a group of dialogs:

•	From the File menu, choose New. This command creates an initial blank dialog.

•	From the Edit menu, choose New Dialog. This command creates further blank dialogs in a group of dialogs.

•	From the Edit menu, choose Select Dialog. This command selects a dialog from the .DLG file for editing.

The Dialog Editor saves a group of dialogs by writing two files---DIALOG.RES and DIALOG.DLG. The Dialog Editor also saves a third file---DIALOG.H---if you have assigned symbolic names to any dialogs.

When you open a file for editing, the Dialog Editor displays and works with the .RES file---a binary file. The .DLG file is a text file that you include in an .RC script when compiling your application.

 DIALOG is the default base name for files. You can save a file under any name.


Dialogs and the Resource Compiler
Include your .H and .DLG files in the resource script (.RC) file for your application (place the .H file before the .DLG file in the .RC file). Also include the .H file in your source code.

Write a dialog procedure for each dialog to initialize controls and process its messages. Place each dialog procedure name in the module-definition file.


Creating Files
 Creating a File

Use the New command on the File menu to create a new file. A new file appears with a blank dialog.

When you create a blank dialog, the dialog is selected---indicated by solid sizing handles around its border---and is ready for editing.

 A .DLG file may contain a number of dialogs. To add dialogs to your file, choose the New Dialog command on the Edit menu.

 Other steps:

•	Double-click the dialog to open the Dialog Styles dialog box. You can change the properties of the dialog in this dialog box. For instance, you can remove the title or change the border.

•	Add controls from the Toolbox.

•	Duplicate the dialog after adding controls.

•	Create another blank dialog.

 The Dialog Editor displays only one dialog at a time if you have a group of dialogs in a file. To select a dialog in a group for editing, choose the Select Dialog command from the Edit menu.


 Opening a File

The Open command on the File menu loads an existing dialog or group of dialogs.

 To open an existing group of dialogs:

1.	From the File menu, choose Open.

2.	Select the drive from the Drives drop-down list box.

3.	Select the directory where the file is stored from the Directories list box.

4.	Type a filename in the File Name text box or select a name from the files list.

5.	Choose OK to open the file.


Open Command Shortcut Keys
Open	CTRL+0


 Creating Additional Dialogs

When a .DLG file is created, it displays a blank dialog. To add dialogs to a new or opened .DLG file, use the New Dialog command on the Edit menu.

 To add a dialog to a file:

•	From the Edit menu, choose New Dialog.

 You can also duplicate an existing dialog with the Duplicate command on the Edit menu.


New Dialog Shortcut Key
New Dialog	CTRL+SHIFT+N


 Creating Controls

Once you have created a dialog or opened an existing one, you can add controls to it.

 To add a control to a dialog:

1.	Click a control on the Toolbox. Clicking a control selects it.

2.	Move the cursor into the dialog. A rectangle with the "move" icon inside of it replaces the cursor.

If you want a different control, click the correct one in the Toolbox before you go on to Step 3. You can also cancel a control selection by pressing ESC.

3.	Press and hold the mouse button to see an outline of the control. The coordinates for the location of the control are displayed in the Properties Bar.

You cannot move the outlined control outside of the dialog once you have pressed the mouse button.

4.	Drop the control by releasing the mouse button.


 Check Box Control

The Check Box icon in the Toolbox adds a check box control to the current dialog box.

A check box control is a square box with a text label to the right of the box. It is normally used in groups that allow several options to be checked at once. Clicking the box or the text checks or unchecks the control.


 Combo Box Control

The Combo Box icon in the Toolbox adds a combo box control to the current dialog box.

A combo box control combines a text entry field with a list box. The user selects an item from the list, which is then displayed in the entry field.


 Edit Field Control

The Edit Field icon in the Toolbox adds an edit field control to the current dialog box.

An edit field is a rectangular field in which the user enters text.


 Frame Control

The Frame icon in the Toolbox adds a frame control to the current dialog box.

A frame control is a rectangular box used for simple graphics.


 Group Box Control

The Group Box icon in the Toolbox adds a new group box control to the current dialog box.

A group box is a frame used for grouping related controls together. A group box has a text label on its top edge.


 Horizontal Scroll Bar Control

The Horizontal Scroll Bar icon in the Toolbox adds a horizontal scroll bar to the current dialog box.

A horizontal scroll bar is used to scroll the contents of the window horizontally. The horizontal scroll bar has a scrolling arrow at each end and a slider that can be set at any point on the bar.


 Icon Control

The Icon icon in the Toolbox adds an icon control to the current dialog box.

An icon control is a rectangle that marks the position of an icon. The icon is defined in an .ICO file you create with the Image Editor.

A sample icon is displayed in the bitmap control. The sample icon control cannot be sized. The actual size displayed in the dialog box depends on the size of the icon resource associated with it.


 List Box Control

The List Box icon in the Toolbox adds a list box control to the current dialog box.

A list box control is a rectangle with a vertical scroll bar on its right side. Inside the rectangle, a list of strings is displayed from which the user can select.


 Push Button Control

 The Push Button icon in the Toolbox adds a push button control to the current dialog box.

A push button control is a rectangle with rounded corners and a text label. The user clicks it to perform an action.


 Radio Button Control

The Radio Button icon in the Toolbox adds a radio button control to the current dialog box.

A radio button control is a small circle with a text label to its right. It is normally used in groups that allow only one radio button to be selected at a time. Clicking the circle or the text chooses the option and deselects the previously selected option.


 Rectangle Control

The Rectangle icon in the Toolbox adds a rectangle control to the current dialog box.

A rectangle control is a colored rectangle, typically used in simple graphics. Rectangles can also be flattened into lines for separating controls.


 Text Control

The Text icon in the Toolbox adds a text control to the current dialog box.

A text control displays a text label.


 Vertical Scroll Bar Control

The Vertical Scroll Bar icon in the Toolbox adds a vertical scroll bar control to the current dialog box.

A vertical scroll bar is used to scroll the contents of the window vertically. The vertical scroll bar has a scrolling arrow at each end and a slider that can be set at any point on the bar.


 Custom Control

The Custom icon in the Toolbox adds a user-defined control to the current dialog box.

A custom control is a window defined in the program used for specialized input or output. A colored rectangle shows the area where the control appears.

 The behavior and appearance of a custom control is defined by a dynamic-link library (DLL) you supply.


 Saving Dialogs

The Save command on the File menu saves the current dialogs under the name shown in the title bar. The Dialog Editor saves a .DLG and a .RES file under the same base name. If the dialogs contain symbolic names, an .H file with the same base name as the .DLG and .RES files will be saved as well.

If the group of dialogs is unnamed, the Save Resource File dialog box appears. You can also choose Save As from the File menu to save under a different name. In this case, the original files do not change.

To save dialogs, do one of the following:

•	Choose the Save command from the File menu

•	Choose the Save As command from the File menu.


Save Command Shortcut Keys
Save	CTRL+S


 Saving Dialogs Under a New Name

The Save As command on the File menu saves the current dialogs under a filename of your choice or renames an existing file.

 To save under a new name:

1.	From the File menu, choose Save As. If you have an include (.H) file associated with the .DLG file, the Save Include File dialog box is displayed.

2.	Type a new name for the .H file, and then choose OK. The Save Resource File dialog box is now displayed.

3.	Type a new name for the .RES file, and then choose OK. When you save the .RES file, the Dialog Editor automatically saves the changes in the .DLG file.

You now have a copy of the dialogs saved under a new name. The original file of dialogs remains unchanged.

When saving the .H and .RES files, the dialog boxes come up in sequence to allow you to save all three files.

 It is strongly recommended that you use a separate include file (.H) for the IDs in your application's dialogs. This include file may have comments, but should not have more than one symbol defined for a single ID value. Only the first symbol read in the include file is used by the editor.


 Saving an Include (.H) File

The Save Include dialog box saves an include (.H) file associated with a file of dialogs. The include file contains #define statements that identify dialogs and controls in your application with symbolic names. You use the symbolic names in your application's C source code to refer to the dialogs and controls.

The Save Include dialog box appears when you:

•	Save a file for the first time and have assigned symbolic names to dialogs or controls

•	Have revised an existing .H file

 To save an include file:

•	Type a new name for the .H file, and then choose OK.

The Save Resource File dialog box appears, allowing you to name a new file or rename an existing one.

 It is strongly recommended that you use a separate include file (.H) for the IDs in your application's dialogs. This include file may have comments, but should not have more than one symbol defined for a single ID value. Only the first symbol read in the include file is used by the editor.


Associating an Include File of a Different Name
 Associating an Include File of a New Name

The include file (.H) contains the symbolic names you've assigned to dialog controls.

By default, the Dialog Editor uses the same base name for all the files it writes.

The Set Include command on the File menu can associate an include file of a different name with a group of dialogs (a .DLG file).

 To set an include file:

1.	From the File menu, choose Set Include.

2.	Select the drive from the Drives drop-down list box.

3.	Select the directory where the include file is stored from the Directories list box.

4.	Type a filename in the File Name text box or select a name from the files list.

5.	Choose OK to associate the file with the current dialogs.

 Once an include file has been associated with a .DLG file, the Dialog Editor maintains this association between editing sessions. The Dialog Editor creates a special resource that is added to the .DLG and .RES files. This resource is used only by the Dialog Editor to remember which include file has been associated with the group of dialogs.


 Exiting the Dialog Editor

The Exit command on the File menu closes the Dialog Editor.

If the current dialogs are unsaved, you will be asked whether they should be saved.


Exit Command Shortcut Key
Exit	ALT+F4


 Key to the Properties Bar

The Properties Bar displays information about the currently selected control or dialog.

For help, click a field in the Properties Bar below---or press TAB to move to the field, and then press ENTER:

When editing a symbolic name in the Properties Bar, press OK to apply the changes or ESC to cancel. You may also click a different control or choose a menu command and the changes will be applied to the current control. However, if any of your changes are invalid, you will not be able to leave the Properties Bar until you have corrected the mistake or pressed ESC.

For help on the Symbol combo box, click the drop-down list below---or press TAB to move to the list, and then press ENTER:


Properties Bar Access Key
Jump to Properties Bar	F10


Coordinates on the Properties Bar
The coordinates of the current selection are displayed in this rectangle. The upper-left x and y coordinates of the current selection are displayed at the upper-left, and the lower-right corner coordinates are displayed at the lower right. The selection's width (cx) and height (cy) are displayed in the upper-right and lower-left corners.


Text Field in the Properties Bar
The text associated with the current selection is displayed in the Text or Caption field. A Text field is displayed for controls----a Caption field is displayed for dialogs.The text can be edited at any time. If the selection is a bitmap or an icon, the text field contains the resource name or ID number for the graphic.


Dialog Name in the Properties Bar
If the current selection is a dialog, the dialog's name appears in the Symbol field.

The name can be a string name or a symbolic name (ID_OpenDialog) with an associated ID value (300).

Symbolic names take up less space in the resource than string names. The ID value you choose is the starting ID base for any controls you add to the dialog. For example, if a dialog with the symbolic name ID_NewFile has an ID value of 300, the first control for the dialog starts with an ID of 301. Additional controls are numbered incrementally.


Control Symbolic Name in the Properties Bar
If the current selection is a control, the symbolic name and ID value are shown. The symbolic name is displayed in a combo box that contains all of the other symbols defined in the current include file. The control value is shown in an entry field to the right of the combo box.

You can edit the symbol and value at any time. You can also enter new symbols in the entry field of the combo box. Since the Dialog Editor assigns a default series of ID values as new controls are created, the value field is updated with the next available ID value as a new symbol is entered.


Symbol Combo Box in the Properties Bar
The Symbol combo box contains the predefined Windows symbols IDOK and IDCANCEL. These values are used for push buttons.

The UNUSED symbol can be assigned to any control that doesn't need a unique symbolic name. These are usually controls such as group boxes, text fields, frames, and other controls that are not normally referenced by the program.

Normally, you cannot have more than one control with the same ID value in a dialog. Since some controls---group boxes, text fields, frames, etc.---will not be referenced in your source code, they can have the same UNUSED ID value.


The Toolbox
 Key to the Toolbox

The Toolbox is a palette of control icons.The Toolbox "floats," meaning you can move it anywhere on the screen by dragging its title bar.

 To select a control from the Toolbox:

1.	If the Toolbox is not displayed, choose Show Toolbox from the Options menu.

2.	Click a control.

3.	Move the cursor into the dialog box.

4.	Click. The control is placed on the dialog.

 To add multiple copies of one control to a dialog, you can "lock" a Toolbox control. To do this, hold down CTRL and then click a control. The control remains selected until you click another control.


Pointer Icon


Toggle Toolbox Key
Show Toolbox	CTRL+F9

Jump to Toolbox	F9


Key to the Toolbox
 Toolbox Controls

Click an icon below for more information. To return to the previous screen, click the icon in the title above.


Key to the Toolbox
 Toolbox Controls

Click an icon below for more information. To return to the previous screen, click the icon in the title above.


 Selecting a Dialog in a File

To edit a dialog from a file of dialogs, you must first select it. A dialog in a file may not be visible since the Dialog Editor displays only one dialog at a time.

 To select a dialog in a file:

1.	From the Edit menu, choose Select Dialog.

2.	Select a dialog from the list, then choose OK.

To choose another dialog in a file, repeat the steps.


Shortcut Key for Select Dialog Command
Select Dialog	CTRL+D


 Selecting Controls for Editing

 To select a single control:

•	Position the cursor on the control, then click.

 To select multiple controls:

1.	Position the cursor in the dialog box background.

2.	Press the mouse button and drag it over the controls you want to select. A rectangle is drawn that defines the selection area.

3.	Release the mouse button. All controls at least partially within the rectangle are selected.

 To add or remove a control from a group of selected controls:

1.	Position the cursor on the control.

2.	Hold the SHIFT key down and click the mouse button. If the control had been selected, it becomes unselected. If the control had been unselected, it becomes selected and added to the group of any other selected controls.

Each selected control in a group is surrounded by eight "sizing handles," or small squares. The control with the dark handles is the anchor control.


Shortcut Keys for Selecting Controls
Select Next Control	TAB

Select Previous Control	SHIFT+TAB


 Undoing Changes to a Dialog

The Restore Dialog command on the Edit menu restores a dialog to its state before it was selected for editing.

You can work on any number of dialogs in a file. Use this command to undo the editing changes in the currently selected dialog without affecting changes in other dialogs.


 Moving and Resizing Controls and Dialogs

 To move or resize a control or dialog:

•	Move with the keyboard by selecting the control or dialog and then using the ARROW keys.

•	Move with the mouse by clicking on the control or title bar or border of the dialog, holding the left mouse button down, and then dragging it to the new location.

•	Resize with the mouse by selecting the control or dialog, then clicking on one of the "sizing handles" surrounding it, holding down the mouse button and dragging the handle.

•	Move a group of selected controls by dragging any one of the controls. You cannot resize a group of controls.


 Cutting Controls and Dialogs

The Cut command on the Edit menu cuts the currently selected dialog or control to the clipboard. If the dialog is selected when you chose the Cut command, the dialog and its controls are cut.

 To cut a dialog, control, or group of controls:

1.	Select the item to cut.

2.	From the Edit menu, choose Cut.


Shortcut Key for the Cut Command
Cut	CTRL+X


 Copying Controls and Dialogs

The Copy command on the Edit menu copies the currently selected dialog or control to the clipboard. If the dialog is selected, the dialog and its controls are copied.

 To copy a dialog box, control, or group of controls:

1.	Select the item to copy.

2.	From the Edit menu, choose Copy.

 When copying a dialog to the clipboard, a bitmap image of the dialog is also copied. You can paste this image into any program that understands the standard Windows bitmap clipboard format.


Shortcut Key for the Copy Command
Copy	CTRL+C


 Pasting Controls and Dialogs

The Paste command on the Edit menu pastes the contents of the clipboard.

If the clipboard contains a control or group of controls, they are pasted into the current dialog. If the clipboard contains an entire dialog, it is pasted into the editor and becomes the current dialog. When you choose the Paste command, a rectangle with the "move" icon inside of it replaces the cursor. Click this icon at the position in which you want the contents of the clipboard to be pasted.


Paste Shortcut Key
Paste	CTRL+V


 Deleting Controls and Dialogs

The Delete command on the Edit menu deletes the currently selected dialog, control, or group of controls. The selected item is not copied to the clipboard.


Delete Shortcut Key
Delete	DEL


 Duplicating Controls and Dialogs

The Duplicate command on the Edit menu duplicates the currently selected dialog, control, or group of controls.

If a dialog is duplicated, the duplicate becomes the new current dialog. If a control or group of controls is duplicated, they are added to the current dialog box.

 You can also duplicate a control or group of controls by holding down the CTRL key and clicking the control or group of controls.


Duplicate Shortcut Keys
Duplicate	F2 or CTRL+mouse drag


 Sizing Controls to Text

The Size to Text command on the Edit menu sizes check boxes, push buttons, text controls, and radio buttons to exactly fit the associated text.

 To size a control:

1.	Select a control or group of controls.

2.	From the Edit menu, choose Size to Text.

When resizing a push button, the width will never become smaller than the default push button size.


Size to Text Shortcut Key
Size to Text	F7


 Editing Symbolic Names

The Symbols command on the Edit menu opens a dialog that edits the symbolic names in the current include file.

 To add a symbol:

1.	From the Edit menu, choose Symbols.

The Symbols dialog box appears.

2.	Enter the name of the symbol in the Symbol text box.

3.	Enter a numeric value in the ID Value text box.

4.	Choose Add.

 To change a symbol:

1.	Select the symbol from the list.

2.	Change the name or numeric value.

3.	Choose Change.

 To delete a symbol:

1.	Select the symbol from the list.

2.	Choose Delete.

When you delete a control, its symbol and ID are not automatically deleted. To display unused symbols, select the Show Unused Symbols Only check box. You may then delete any unused symbols.


Symbols Shortcut Key
Symbols	CTRL+H


 Editing Dialog or Control Styles

The settings you choose for the style of a dialog box or control determine how the dialog or control appears and behaves.

You can edit the style of the currently selected control or dialog with the Styles command on the Edit menu.

Controls have a set of basic styles, and styles applicable to each control.

 As a shortcut to the menu command, double-click an item to display its available styles.


 Styles

•	Check Box Styles

•	Combo Box Styles

•	Dialog Styles

•	Edit Field Styles

•	Frame Styles

•	Group Box Styles

•	Horizontal Scroll Bar Styles

•	Icon Styles

•	List Box Styles

•	Push Button Styles

•	Radio Button

•	Rectangle

•	Text Styles

•	User Control Styles

•	Vertical Scroll Bar


 Dialog Box Styles

The Dialog Styles dialog box changes the styles of the currently selected dialog.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Absolute Align Style
The Absolute Align style makes the x,y origin of the dialog relative to the screen.


Border Style
The Border style creates a dialog with a thin border.


Caption Style
The Caption style displays the dialog box with a title bar.


Child Style
The Child style creates a child window dialog.


Clip Children Style
The Clip Children style excludes the area occupied by child windows when drawing the parent window.


Clip Siblings Style
The Clip Siblings style clips child windows relative to each other---that is, when a particular child window receives a WM_PAINT message, this style clips all other top-level child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not set and child windows overlap, it is possible that drawing in the client area of a child window will also draw in the client area of a neighboring child window.


Dialog Style
The Dialog style creates a standard dialog box border.


Disabled Style
The Disabled style disables the dialog so it cannot be selected.


Discardable Style
The Discardable style allows Windows to discard and reload the dialog from memory as necessary.


Horizontal Scroll Bar Style
The Horizontal Scroll Bar style displays the dialog with a horizontal scroll bar.


Local Edit Style
The Local Edit style specifies that edit controls use memory in the application's data segment. By default, controls use memory outside the application's data segment.


Maximize Button Style
The Max Button style creates a dialog box with a maximize button.


Minimize Button Style
The Min Button style creates a dialog box with a minimize button.


Modal Style
The Modal style creates a dialog with modal frame that can be combined with a title bar and system menu.


Moveable Style
The Moveable style allows Windows to move the dialog box in memory as necessary.


No Idle Message Style
The No Idle Message style suppresses WM_ENTERIDLE messages that Windows would otherwise send to the owner of the dialog box while the dialog is displayed.


Font Face Name Style
The Font Face Name style selects the font used by the dialog and its controls. All fonts in your system are available.


Optional Class Style
The Optional Class style specifies a class. You must register this class before your application creates the dialog. If you leave the field blank, the default dialog class is selected.


Popup Style
The Popup style creates a pop-up window.


Preload Style
The Preload style loads the dialog resource into memory as soon as the application starts. If not specified, the dialog resource will be loaded into memory only when needed.


Point Size Style
The Point Size style sets the size of the type for the dialog and controls, measured in "points." All point sizes for the fonts in your system are available.


Pure Style
Pure style. The dialog resource contains no dynamic information. Windows can safely discard the resource under low memory conditions. You should make your dialog pure unless you are dynamically altering the resources.


Sizing Style
The Sizing (Thick) style creates a standard sizing border that allows the dialog to be resized using the mouse.


System Menu Style
The System Menu style creates a dialog box that has a system menu in its title bar.


System Modal Style
The System Modal style creates a system-modal dialog box. No other window can become active until this dialog is closed.


Vertical Scroll Bar Style
The Vertical Scroll Bar style displays the dialog box with a vertical scroll bar.


Visible Style
The Visible style makes the dialog initially visible.


 Check Box Styles

The Check Box Styles dialog box changes the styles of the currently selected check box control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Auto Style
The Auto style automatically checks and unchecks the control when clicked. If this style is not set, it is the application's responsibility to check and uncheck the box.


3 State Style
The 3 State style. Every check box has a checked and unchecked state. A 3-state check box has a third state---a grayed state---that can be used by an application. The grayed state is typically used to show that a check box has been disabled.


Left Text Style
The Left Text style places text on the left side of the check box.


 Combo Box Styles

The Combo Box Styles dialog box changes the style of the currently selected combo box control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Simple Combo Box
The Simple style makes the list box always visible. A string can be selected from the list or text can be typed in the entry field.


Disable No-Scroll Style
The Disable No-Scroll style---Windows 3.1 only. If the combo box does not contain enough items to scroll, the scroll bars will be shown in a disabled state. If this style is not selected, the combo box hides the scroll bar when the scroll bars are unnecessary.


Drop-Down Combo Box
The Drop-Down style is the same as a simple combo box style, but the list "drops down" and appears when the arrow icon is clicked.


Drop-Down List Combo Box
The Drop-Down List style is the same as a drop-down combo box style, but text cannot be entered. Only strings displayed in the list can be selected.


Auto HScroll Style
The Auto HScroll style scrolls the text when the user types a character at the end of the line. If this style is not set, text is restricted to the boundaries of the edit control.


Has Strings Style
The Has Strings style is valid only for owner-drawn combo boxes. The combo box contains strings. The box maintains the memory and pointers for the strings so that the application can use the CB_GETTEXT message to retrieve the string.


No Integral Height Style
The No Integral Height style creates a combo box that doesn't adjust to display an integral number of lines.


OEM Convert Style
The OEM Convert style converts entered text from the ANSI to the OEM character set and back to ANSI. This ensures proper character conversion for the AnsiToOem function.


Owner-Draw Fixed Style
The Owner-Draw Fixed style specifies a fixed-height owner-draw combo box. The owner of the list box is responsible for drawing its contents; the items in the list box are all the same height.


Owner-Draw Variable Style
The Owner-Draw Variable style specifies a variable-height owner-draw combo box. The owner of the list box is responsible for drawing its contents; the items in the list box can have different heights.


Sort Style
The Sort style sorts strings entered in the list box.


Vertical Scroll Bar Style
The Vertical Scroll Bar style creates a vertical scroll bar in a combo box.


 Edit Field Styles

The Edit Field Styles dialog box changes the style of the currently selected Edit Field control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Left Style
The Left style creates flush-left text.


Center Style
The Center style centers text. This is valid only for multi-line controls.


Right Style
The Right style creates flush-right text. This is valid only for multi-line controls.


Auto HScroll Style
The Auto HScroll style automatically scrolls text 10 characters to the right when a user types a character at the end of the line.


Auto VScroll Style
The Auto Vscroll style automatically scrolls text up one page when the user presses ENTER on the last line---this is valid only for multi-line controls.


Border Style
The Border style draws a border around the control.


Horizontal Scroll Style
The Horizontal Scroll style gives the multiple-line edit control a horizontal scroll bar.


Lowercase Style
The Lowercase style converts characters to lowercase as they are typed.


Multi-Line Style
The Multi-Line style creates a multiple-line edit control.


No Hide Sel Style
The No Hide Selection style. Normally, an edit control hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. Setting this style overrides this default.


OEM Convert Style
The OEM Convert style converts characters to the OEM character set and then back to ANSI when typed. This ensures the proper character conversion when the application calls the AnsiToOem function to convert an ANSI string to OEM characters. This style is most useful for edit controls that contain filenames.


Password Style
The Password style displays all characters as asterisks (*) when typed.


Read Only Style
Read Only style (Windows 3.1 only) specifies that the edit control is read-only. The user is allowed only to scroll through or copy text from this control to the clipboard.


Uppercase Style
The Uppercase style converts characters to uppercase as they are typed.


Vertical Scroll Style
The Vertical Scroll style gives the multiple-line edit control a vertical scroll bar.


 Frame Styles

The Frame Styles dialog box changes the style of the currently selected frame control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Black Style
The Black style matches the frame with the window frame color---black by default.


Gray Style
The Gray style matches the frame with the desktop color---gray by default.


White Style
The White style matches the frame with the window background color---white by default.


 Group Box Styles

The Group Box Styles dialog box changes the style of the currently selected group box control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


 Horizontal Scroll Bar Styles

The Horizontal Scroll Bar Styles dialog box changes the style of the currently selected horizontal scroll bar control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


 Icon Styles

The Icon Styles dialog box changes the style of the currently selected icon control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


 List Box Styles

The List Box Styles dialog box changes the style of the currently selected list box control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Disable No-Scroll Style
Disable No-Scroll style---Windows 3.1 only. If the list box does not contain enough items to scroll, the scroll bars will be shown in a disabled state. If this style is not selected, the list box hides the scroll bar when the scroll bars are unnecessary.


Standard Style
The Standard style includes the following list box styles: Notify, Sort, Vert. Scroll Bar, and Border.


Horizontal Scroll Bar Style
The Horizontal Scroll Bar style creates a horizontal scroll bar.


Border Style
The Border style creates a border.


Sort Style
The Sort style sorts list-box strings alphabetically.


Notify Style
The Notify style. The parent receives an input message whenever the user clicks or double-clicks a string.


Vertical Scroll Bar Style
The Vertical Scroll Bar style creates a vertical scroll bar.


Use Tab Stops Style
The Use Tab Stops style enables the list box to recognize and expand tabs when drawing strings.


Multi-Column Style
The Multi-Column style enables a list box with multiple columns to be scrolled horizontally.


No Redraw Style
The No Redraw style. The list box display is not updated when changes are made.


No Integral Height Style
The No Integral Height style makes the size of the list box exactly the size specified in the Dialog Editor. Normally, Windows sizes a list box so that it doesn't display partial items.


Want Keyboard Input Style
The Want Keyboard Input style. The owner of the list box receives WM_VKEYTOITEM and WM_CHARTOITEM messages when the box has the focus. The owner of the box can then perform special processing on the keyboard input.


Multiple Selection Style
The Multiple Selection style toggles the string selection each time the user selects it. The user can select any number of strings.


Extended Selection Style
The Extended Selection style enables the user to select multiple items using the mouse with the SHIFT and CTRL key combinations or other special key combinations.


Owner-Draw Fixed Style
The Owner-Draw Fixed style makes the owner draw the box, and all items are the same height.


Owner-Draw Variable Style
The Owner Draw Variable styles makes the owner draw the box, and items are of variable height.


Has Strings Style
The Has Strings style is only valid for owner-drawn list boxes. The list box contains strings. The box maintains the memory and pointers for the strings so that the application can use the LB_GETTEXT message to retrieve the string.


 Push Button Styles

The Push Button Styles dialog box changes the style of the currently selected push button control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Default Style
The Default style creates a button with a heavy black border. Only one default push button is allowed in a dialog.


Standard Style
The Standard style creates a rectangular button with rounded corners that contains the given text. The control sends a message to its parent whenever the user clicks the push button.


Owner-Drawn Style
The Owner-Drawn style signifies an owner-drawn button. The parent window is notified when the button is clicked. Notification includes a request to paint, invert, and disable the button.


 Radio Button Styles

The Radio Button Styles dialog box changes the style of the currently selected radio button.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Auto Style
The Auto style causes the button to automatically select itself when clicked. Otherwise, it is the applications' responsibility to select the button.


Left Text Style
The Left Text style places the button's text on the left side of the button rather than on the right.


 Rectangle Styles

The Rectangle Styles dialog box changes the style of the currently selected rectangle control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Black Style
The Black style matches the  rectangle with the window frame color---black by default.


Gray Style
The Gray style matches the rectangle with the desktop color---gray by default.


White Style
The White style matches the rectangle with the window background color---white by default.


 Text Styles

The Text Styles dialog box changes the style of the currently selected text control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:


Left Style
The Left style displays text flush left in a simple rectangle. Text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line.


Center Style
The Center style displays text centered in a simple rectangle. Text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line.


Right Style
The Right style displays text flush right in a simple rectangle. Text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line.


Simple Style
The Simple style designates a simple rectangle and displays a single line of text flush left in the rectangle. (The control's parent window or dialog box must not process the WM_CTLCOLOR message.)


Left (No-Wrap) Style
The Left (No Wrap) style displays text flush left in a simple rectangle. Tabs are expanded, but words are not wrapped. Text that extends past the end of a line is clipped.


User-Item Style
The User-Item style identifies a user-defined item.


No Prefix Style
No Prefix style. Unless this style is specified, Windows will interpret the ampersand character (&) in the control's text as an accelerator prefix command. Each & character will be removed and the next character underlined.


 Custom Control Styles

The Custom Control Styles dialog box changes the style of the currently selected custom control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:

:


Class Name Edit Field
The Class Name style is the name of the class that your application will register to handle the messages for this custom control.


Styles Edit Field
The Styles style. Always enter this information as an eight-digit hex constant---"0x" followed by eight hexadecimal digits. The Basic Styles are contained in the upper four digits. If you check any of these styles, the hex constant will be automatically updated.


 Vertical Scroll Bar Styles

The Vertical Scroll Bar Styles dialog box changes the style of the currently selected vertical scroll bar control.

For help, click a field in the dialog below---or press TAB to move to the field, and then press ENTER:

:


Visible Style
The Visible style makes the control visible. If this style is not set, the control will initially be invisible.


Disabled Style
The Disabled style disables a control. A disabled control cannot be selected. It is usually displayed in a grayed color.


Group Style
The Group style. A control with this attribute begins a new "group." Controls in a group are usually positioned close together in a logical unit. The ARROW keys will cycle through controls in a group in the order that they are defined in the dialog.

Use the Order/Group dialog box on the Arrange menu to change control order and to define groups.


Tab Stop Style
The Tab Stop style determines that the control can be jumped to by pressing the TAB key.


 Selecting a Group of Controls for Editing

 To select multiple controls:

1.	Position the cursor in the dialog box background.

2.	Press the mouse button and drag it over the controls you want to select. A rectangle is drawn that defines the selection area.

3.	Release the mouse button. All controls at least partially within the rectangle are selected.

 To add or remove a control from a group of selected controls:

1.	Position the cursor on the control.

2.	Hold down the SHIFT key and click the mouse button. If the control had been selected, it becomes unselected. If the control had been unselected, it becomes selected and added to the group of any other selected controls.

Each selected control in a group is surrounded by eight "sizing handles," or small squares.


Aligning a Group along an Edge
 Aligning a Group of Controls

The Align command on the Arrange menu aligns a selected group of controls to the left edge, right edge, top edge, bottom edge, or center of the group's anchor control.

  To align controls:

1.	Select the controls you want to align.

2.	Set the anchor control for the alignment.

3.	From the Arrange menu, choose Align.

4.	From the cascading menu, choose an alignment for the controls.


Alignment Commands
Command	Description
	Aligns controls with the left edge of the anchor control
	Aligns controls vertically with the center of the anchor control
	Aligns controls with the right edge of the anchor control
	Aligns controls with the top edge of the anchor control
	Aligns controls horizontally with the center of the anchor control
	Aligns controls with the bottom edge of the anchor control


 Spacing a Group Evenly

The Even Spacing command on the Arrange menu evenly spaces a selected group of controls either vertically or horizontally in relation to the group's anchor control.

 To align controls:

1.	Select the controls you want to align.

2.	Set the anchor control and position it where you want it.

3.	From the Arrange menu, choose Even Spacing.

4.	From the cascading menu, choose an arrangement for the controls.


Spacing Commands
Command	Description
	Distributes the controls above and below the anchor control. Use the Settings command on the Arrange menu to set the vertical spacing between controls (Vertical Control Spacing constant).
	Distributes controls to the right and left of the anchor control. Use the Settings command on the Arrange menu to set the horizontal spacing between controls (Horizontal Control Spacing constant).


 Sizing a Group Uniformly

The Same Size command on the Arrange menu changes the width or height of a group of selected controls. The controls are resized based on the group's anchor control.

 To size controls:

1.	Select the group of controls you want to size.

2.	Set the anchor control.

3.	From the Arrange menu, choose Same Size.

4.	From the cascading menu, choose a dimension.


Dimension Commands
Command	Description
	Makes the selected controls the same width as the anchor control
	Makes the selected controls the same height as the anchor control.


 Arranging a Group of Push Buttons

The Push Buttons command on the Arrange menu aligns a group of selected push buttons along the bottom of the dialog box or down the right side.

 To align push buttons:

1.	Select the push buttons you want to align.

2.	From the Arrange menu, choose Push Buttons.

3.	From the cascading menu, choose an arrangement for the push buttons.

As an alternative to selecting all of the push buttons, you can select the dialog before using this command. All push buttons are arranged if the dialog is selected when choosing this command.

 The anchor control does not matter when arranging push buttons.


Arrange Push Button Commands
Command	Description
	Places push buttons along the bottom of the dialog. The buttons are arranged by their order. Buttons are centered according to the Min and Max Horizontal Push Button Spacing. Set the Min and Max spacing with the Settings command on the Arrange menu. Min spacing is the minimum distance that will appear between buttons; Max spacing is the maximum.
	Places push buttons along the right side of the dialog. The buttons are arranged by their order. Buttons are separated by the vertical spacing set with the Settings command (Vertical Push Button Spacing).


 Ordering a Group

You can gather controls into groups, set the tab order, and set the "cycling" order for controls in a group with with the Order/Group command on the Arrange menu.

When a user presses TAB, the cursor moves from one tab stop to another if tab stops are defined. For instance, pressing TAB may move the cursor from the first control in one group to the first control in another group.

Within a group, a user can "cycle" the selection cursor from one control to another in an order you define. The ARROW keys cycle the selection cursor within a group of controls. For instance, the ARROW keys can move the selection cursor up and down a group of radio buttons in a defined order.

You determine the logic of the tab moves and cycling order with the Order/Group command.

 Procedures:

1.	Creating a group of controls

2.	Setting a control tab stop

3.	Changing the tab/cycling order of controls

4.	Removing a tab stop

5.	Removing a group marker


Order/Group Shortcut Key
Order/Group	CTRL+G


Changing the Position of a Control in the List
 To change the tab/cycling order of a control in a group:

1.	From the Arrange menu, choose Order/Group.

2.	Select the control in the list box. The controls are listed by tab/cycling order, not by the physical order in your dialog.

3.	Move the cursor to the position in the control list where you want to place the selected control. The cursor changes shape to a "horizontal" insertion point at which you can insert the control.

This "area" for inserting the control is at the base of a control listing---watch for the change in the cursor shape to indicate where a control can be dropped.

4.	Click.

 Changing the tab/cycling order for multiple controls:

1.	Click the first control.

2.	Drag and select all of the controls you want to move.

3.	Release the mouse button.

4.	Follow Steps 3 and 4 above to move the selected controls.

You can also select a group of controls to move in relation to another group of controls.


Creating a Group of Controls
 To create a Group of Controls:

1.	From the Arrange menu, choose Order/Group.

2.	Click the first control you want in the group, then drag the mouse down and select the other controls to make up the group.

3.	Choose Make Group.

Groups are shown by lines separating the control names in the list box. Since a group of controls must be contiguous in order, groups should be defined only after the tab order is correct.


Removing a Group
 To remove a Group Marker:

•	In the dialog, double-click the first control in the group to bring up the styles dialog box for the control. Uncheck the Group style for the control.

--or--

•	Use the Order/Group command to define a different grouping for the controls in the old group.


Setting a Control Tab Stop
 To set a Control Tab Stop:

1.	From the Arrange menu, choose Order/Group.

2.	Select the control.

3.	Choose Set Tab.

 A tab symbol to the left of a control name in the Order/Group list indicates the control has a tab stop. This means when the user presses TAB, the cursor moves to the next control with a tab stop.

 Double-clicking the control in the list box toggles the tab stop off and on.


Removing a Tab Stop
 To remove a Tab Stop:

1.	From the Arrange menu, choose Order/Groups.

2.	Select the control with the tab symbol.

3.	Choose Clear Tab.

 Double-clicking the control in the list box toggles the tab stop off and on.


 Changing Grid Size and Spacing Constants

The Settings command on the Arrange menu lets you change grid and spacing constants for arranging controls in a dialog.

 The options include:

•	Grid

•	Control Spacing

•	Margins

•	Push Button Spacing

•	Defaults


Settings Shortcut Key
Settings	CTRL+A


Grid Value Constants
The Grid value sizes and positions controls. Control coordinates are only allowed in exact multiples of the grid values. A grid value greater than 1 can be useful when aligning controls with each other.


Horizontal and Vertical Constants
The horizontal and vertical constants are the number of dialog units used in spacing. Use the Control Spacing constants with the Even Spacing command on the Arrange menu.


Margin Constants
Margin constants determine the number of dialog units that the push buttons are inset from the edges of the dialog. Use the Margin constants with the Push Button command on the Arrange menu.


Push Button Spacing Constants
The Push Button Spacing constants are the number of dialog units between push buttons. Use the Push Button Spacing constants with the Push Button command on the Arrange menu.


Defaults Button
The Defaults button resets all constants to the defaults.


 Using Test Mode

The Test Mode command on the Options menu creates a working copy of the current dialog so that the controls can be tested and operated.

List boxes and combo boxes will have sample lines inserted into them.

To exit test mode, choose Test Mode from the Options menu---or if the dialog box has a Close command on its system menu, use it.

 Certain styles of some controls are not allowed in test mode. For example, an owner-drawn list box requires code in your application to give it the behavior you want. When a dialog with an owner-drawn list box is tested, a comparable standard list box is substituted for the owner-drawn list box.

 When you press ALT+PRINT SCREEN, Windows places a bitmap image of the currently active frame window into the clipboard. You can paste this bitmap image into any application that can understand the clipboard format. When testing, you may find this Windows feature helpful in obtaining pictures of the dialog for documentation purposes.


Test Mode Shortcut Key
Test Mode	CTRL+T


 Using Hex Mode

The Hex Mode command on the Options menu turns hexadecimal display on and off. When hexadecimal mode is on, a check mark appears to the left of the menu command.

In this mode the ID values of controls and symbols are displayed in hexadecimal notation. When Hex Mode is turned off, the values are displayed in decimal notation.

 The hexadecimal mode also determines how the ID values are written in the include (.H) file and the .DLG file.


 Using Translate Mode

The Translate Mode command on the Options menu ensures safety when translating a dialog into another language---for example, French or German. In this mode, the user can translate text and reposition controls, but cannot accidently change any of the key characteristics of the dialog, such as change the styles or ID value of any control.


 Using New Keywords

The New Keywords command in the Options menu is on by default. When on, the Dialog Editor uses the new RC keywords for the dialog templates written to the .DLG file. You can uncheck the option to write control lines in the .DLG file with the old CONTROL keyword. This option does not affect the binary resource file (.RES).

The setting you choose is remembered between editing sessions.


 What is a Custom Control?

When a standard control---such as a list box or edit field---doesn't meet your needs, you can create a custom control to perform a specific task. For example, a toolbar at the top of a screen can be a custom control.

The code that defines a custom control resides in a DLL or, occasionally, in the .EXE file that will call the dialog box.

The Dialog Editor supports custom control DLLs and temporary custom controls. A custom control DLL is a dynamic-link library that defines one or more custom control classes. A temporary custom control is a placeholder for a custom control defined elsewhere. The Dialog Editor creates a gray rectangle to indicate the control's location and size.

Custom controls defined in DLLs can be opened by the Dialog Editor. Once opened, those controls remain available between sessions with the Dialog Editor. Temporary custom controls are not saved between sessions.

When the Dialog Editor opens a file that contains a custom control, it searches its list of custom control DLLs to find a match. If a match is found, the Dialog Editor uses the information in the DLL to display the custom control. If a match is not found, the Dialog Editor creates a temporary custom control with the given class name.


 Creating a Temporary Custom Control

The New Custom command on the Edit menu creates a new temporary custom control.

 To create a new temporary control:

1.	From the File menu, choose New Custom. The New Temporary Custom Control dialog box appears.

2.	Type a name for the custom control in the Class Name edit field.

3.	Optionally, change the other Control Defaults.

4.	Choose OK.

The Dialog Editor adds the temporary control to the list of available custom controls. To use the temporary control, click the custom control tool.

 If you later open a DLL that contains a custom control with the same class name as a temporary custom control, the temporary control is replaced by the one in the DLL.


Control Defaults
Control Defaults let you set default values for your new temporary custom control. The values you specify here will be used as the initial values for all custom controls of this class.

Option	Description
Style	Style of the control
Width	Width of control in dialog units
Height	Height of control in dialog units
Text	Text appears centered on control


Custom Control Tool


 Opening a Custom Control DLL

The Open Custom command on the Edit menu opens a DLL containing one or more custom controls and adds those controls to the list of available custom controls.

 To add custom controls in a DLL to the available custom controls:

1.	From the File menu, choose Open. The Open Custom Control DLL dialog appears.

2.	Select a drive from the Drives drop-down list box.

3.	Select the directory where the DLL is stored from the Directories list box.

4.	Type a DLL filename in the File Name text box or select a name from the files list.

5.	Choose OK.

The Dialog Editor adds all the custom controls in the DLL you selected to the list of available custom controls. To use the temporary control, click the custom control tool.

 The Dialog Editor saves the list of custom controls between sessions. To remove a custom control from the list, choose the Remove Custom command from the File menu.

 If the Dialog Editor cannot find the DLL associated with a custom control in a dialog, it creates a temporary custom control with the same class name.


 Removing a Custom Control

The Remove Custom command on the Edit menu removes a custom control from the list of available custom controls. You can remove both temporary custom controls and custom control DLLs.

 To remove a custom control:

1.	From the File menu, choose Remove Custom. The Remove Custom Control dialog box appears.

2.	Select the class name of the custom control you want to remove.

3.	Choose OK.


 Adding a Custom Control to a Dialog Box

You use the same method to add either a custom control  DLL or a temporary custom  control to a dialog box.

 To add a custom control:

1.	Click the custom control tool on the Toolbox.

If you have more than one custom control installed, the Select Custom Control dialog box appears. If you only have one custom control, skip to Step 4.

2.	From the Available Controls list box, select the class name of the custom control you want to add to the dialog box.

3.	Choose OK.

4.	Move the cursor into the dialog. A rectangle with the "move" icon inside of it replaces the cursor. You can cancel the control selection by pressing ESC.

5.	Press and hold the mouse button to see an outline of the control. The coordinates for the location of the control are displayed in the Properties Bar.

You cannot move the outlined control outside of the dialog once you have pressed the mouse button.

6.	Drop the control into place by releasing the mouse button. The custom control is centered over the point  where you released the mouse button.


Temporary Custom Control Definition
A temporary custom control is a placeholder for a custom control defined elsewhere. The Dialog Editor creates a gray rectangle to indicates the control's location and size.

If you later open a DLL that contains a custom control with the same class name as a temporary custom control, the temporary control is replaced by the one in the DLL.


Custom Control DLL Definition
A custom control DLL is a  dynamic-link library  that defines one or more custom control classes.


 Shortcut Keys

Key	Description
ALT+F4	Exit the Dialog Editor
CTRL+C	Copy the selection to the Clipboard
CTRL+D	Select a dialog
CTRL+F9	Toggle Toolbox palette
CTRL+H	Display symbols
CTRL+N	Create a new dialog
CTRL+O	Open a file
CTRL+S	Save a file
CTRL+SHIFT+N	Create a new dialog in an existing file
CTRL+T	Toggle dialog test mode
CTRL+V	Paste the contents of the Clipboard
CTRL+X	Delete selection and copy it to the Clipboard
CTRL+Y	Open a styles dialog
DEL	Delete the selection
F10	Jump to Properties Bar
F2	Duplicate the selection
F9	Jump to Toolbox


 Help Keys

Key	Description
F1	Help for menu commands, dialog boxes, Toolbox, and Properties Bar
SHIFT+TAB	Move cursor to previous link
TAB	Move cursor to next link


 Keys to Select and Arrange Controls

Key	Description
ARROW	Move the selected control
CTRL+A	Display alignment settings
CTRL+D	Select a dialog box
CTRL+G	Order/groups controls
CTRL+mouse drag	Duplicate selected controls
ENTER	Display control styles
F2	Duplicate selected controls
F7	Size control to text
SHIFT+mouse click	Select multiple controls
SHIFT+TAB	Select previous control
TAB	Select next control


Module-Definition File Definition
A module-definition file is a text file that describes the name, attributes, exports, imports, system requirements, and other characteristics of an application or dynamic-link library. A module-definition file is used by LINK and by IMPLIB.


Anchor Control Definition
The anchor control is the control with solid "sizing handles" in a selected group of controls. The anchor control has information displayed about it in the Properties Bar. The anchor control is used when aligning controls with the Arrange menu commands.

You change the anchor control by clicking another control.


Control Definition
Each element within a dialog box---whether a push button, a list box, a line of text, or a frame---is called a control.


Three Files Created by the Dialog Editor
File	Description
*.RES	This file stores part of the current dialog information. Don't confuse this file with the .RES file linked into your application.
*.DLG	This file is included in your application's .RC file. The .DLG file describes the current dialogs in resource script statements.
*.H	This file is included in your application source code and .RC file. It also stores part of the current dialog information. This file contains the symbolic names you've assigned to dialog controls.


Dialog Box Definition
A dialog box is a pop-up window that accepts input from the user.


Group of Controls Definition
A group is a collection of controls having a related purpose. Often a group is surrounded by a frame. You can "group" controls with the Order/Group command on the Arrange menu.


Toolbox Definition
The Toolbox is a palette of control icons. You can position the Toolbox anywhere within the Dialog Editor window by dragging its title bar.

To select a control from the Toolbox, click the control icon, move the cursor into the current dialog box, and click.

You can "lock" a control icon by pressing CTRL when you click a control icon. You can then add multiple controls of the same type to a dialog without reselecting the control from the Toolbox. When you click another control in the Toolbox, the control icon is "unlocked."


Default Extension Definition
The default extension that appears in the File Name box is .RES. If you've defined symbolic names for controls in the dialogs, the symbols will be contained in an .H file with the same base name as the .RES file. The Dialog Editor will open and read the .H file as well.


Properties Bar Definition
The Properties Bar is the graphical area below the menu bar that displays information about the currently selected control or dialog.


Selecting Controls
You can select a dialog or control with either the keyboard or mouse.

 To select with the mouse:

1.	Position the pointer on the dialog or control.

2.	Click the mouse button.

 To select with the keyboard:

1.	Press the TAB key to select the next dialog or control.

2.	Press SHIFT+TAB to select the previous dialog or control.

 When you select a dialog or control, eight "sizing handles," or small squares, appear on its borders. The Properties Bar displays information about the selected dialog or control.


Selecting Multiple Controls
You can select more than one control.

 To select multiple controls:

1.	Position the cursor in the dialog background.

2.	Press the mouse button and drag it over the controls you want to select. A rectangle is drawn that defines the selection area.

3.	Release the mouse button. All controls at least partially within the rectangle are selected.

 To add or remove a control from a group of selected controls:

1.	Position the cursor on the control.

2.	Hold the SHIFT key down and click the mouse button. If the control had been selected, it becomes unselected. If the control had been unselected, it becomes selected and added to the group of any other selected controls.

 When you select multiple controls, eight "sizing handles," or small squares, appear on the borders of each control.


Symbolic Name
The Dialog Editor assigns the integer value of 100 to the first dialog it creates. This number is the dialog's ID number. Additional dialogs are assigned numbers in increments of 100.

A symbolic name is a name associated with an ID number. For example, you could assign the symbolic name "ID_Open" to an ID number. You could then refer to the dialog by name instead of by number.


 Basic Control Styles

Style	Description
Visible	If this style is not set, the control will initially be invisible.
Disabled	A disabled control cannot be selected. It is usually displayed in a grayed color.
Group	A control with this attribute begins a new group. Controls in a group are usually positioned close together in a logical unit. The ARROW keys will cycle through controls in a group in the order that they are defined in the dialog. Use the Order/Group command on the Arrange menu to change control order and to define groups.
Tab Stop	A control that has a tab stop style can be jumped to by pressing the TAB key, if the control type supports it.


 Check Box Control

The Check Box icon adds a check box to the current dialog box.

A check box control is a square box with a text label to the right of the box. It is normally used in groups that allow several options to be checked at once. Clicking the box or the text checks or unchecks the control.


 Combo Box Control

The Combo Box icon adds a combo box control to the current dialog box.

A combo box control combines a text entry field with a list box. The user selects an item from the list, which is then displayed in the entry field.


 Edit Field Control

The Edit Field icon adds an edit field control to the current dialog box.

An edit field is a rectangular field in which the user enters text.


 Frame Control

The Frame icon adds a frame control to the current dialog box.

A frame control is a rectangular box used for simple graphics.


 Group Box Control

The Group Box icon adds a new group box control to the current dialog box.

A group box is a frame used for grouping related controls together. A group box has a text label on its top edge.


 Horizontal Scroll Bar Control

The Horizontal Scroll Bar icon adds a horizontal scroll bar to the current dialog box.

A horizontal scroll bar is used to scroll the contents of the window horizontally. The horizontal scroll bar has a scrolling arrow at each end and a slider that can be set at any point on the bar.


 Icon Control

The Icon icon adds an icon control to the current dialog box.

An icon control is a rectangle that marks the position of an icon. The icon is defined in an .ICO file you create with the Image Editor.

A sample icon is displayed in the bitmap control. The sample icon control cannot be sized. The actual size displayed in the dialog box depends on the size of the icon resource associated with it.


 List Box Control

The List Box icon adds a list box control to the current dialog box.

A list box control is a rectangle with a vertical scroll bar on its right side. Inside the rectangle, a list of strings is displayed from which the user can select.


 Push Button Control

The Push Button icon adds a push button control to the current dialog box.

A push button control is a rectangle with rounded corners and a text label. The user clicks it to perform an action.


 Radio Button Control

The Radio Button icon adds a radio button control to the current dialog box.

A radio button control is a small circle with a text label to its right. It is normally used in groups that allow only one radio button to be selected at a time. Clicking on the circle or the text chooses the option and deselects the previously selected option.


 Rectangle Control

The Rectangle icon adds a rectangle control to the current dialog box.

A rectangle control is a colored rectangle, typically used in simple graphics. Rectangles can also be flattened into lines for separating controls.


 Text Control

The Text icon adds a text control to the current dialog box.

A text control displays a text label.


 Vertical Scroll Bar Control

The Vertical Scroll Bar icon adds a vertical scroll bar control to the current dialog box.

A vertical scroll bar is used to scroll the contents of the window vertically. The vertical scroll bar has a scrolling arrow at each end and a slider that can be set at any point on the bar.


 Custom Control

The Custom icon adds a user-defined control to the current dialog box.

A custom control is a window defined in the program used for specialized input or output. A colored rectangle shows the area where the control appears.


Copyright

Information in this online document is subject to change without notice and does not represent a commitment on the part of Microsoft Corporation. The software and/or databases described this document are furnished under a license agreement or nondisclosure agreement. The software and/or databases may be used or copied only in accordance with the terms of the agreement. It is against the law to copy the software on any medium except as specifically allowed in the license or nondisclosure agreement. The purchaser may make one copy of the software for backup purposes. No part of this online document and/or databases may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or information storage and retrieval systems, for any purpose other than the purchaser's personal use, without the express written permission of Microsoft Corporation.

© 1992 Microsoft Corporation. All rights reserved.

Microsoft is a registered trademark and Windows is a trademark of Microsoft Corporation.